package com.heima.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heima.model.admin.pojo.AdUser;
import org.apache.ibatis.annotations.Update;

/**
 * @author Ronaldo
 * @date 2021/7/30
 */
public interface AdUserMapper extends BaseMapper<AdUser> {

    /**
     * 根据id更新用户最后一次的登陆时间
     * @param id
     */
    @Update("UPDATE ad_user SET login_time = NOW() WHERE id = #{id}")
    void updateLoginTime(Integer id);
}
